﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FilStartUps_ForumDisplay.ascx.cs"
    Inherits="FilStartUps.Controls.FilStartUps_ForumDisplay" %>

    <%@ Import Namespace="FilStartUps.Helper" %>
   
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            <asp:Label runat="server">Forum Topics</asp:Label>&#062;
            <asp:LinkButton runat="server" ID="lbcreatethread" OnClick="lbcreatethread_Click">Start a new Thread in this topic</asp:LinkButton>
        </td>
    </tr>
</table>
<br />
    <asp:Label runat="server" ID="lterror" Visible="False" Font-Size="Large" 
    ForeColor="Red">
            No Thread Found.
    </asp:Label>

<%--  OnPageIndexChanged="dotForumDisplay_Paged"--%>
<asp:DataGrid runat="server" ID="dgforumthread" BorderWidth="0" CellPadding="0" CellSpacing="0"
    Width="100%" HeaderStyle-BackColor="#4373B4" AllowPaging="True" OnItemCommand="dgforumthread_ItemCommand"
    PageSize="10" AutoGenerateColumns="False" OnPageIndexChanged="dgforumthread_Paged">
    <PagerStyle Mode="NextPrev" HorizontalAlign="Right" CssClass="pageLink" BackColor="#ffffff"
        NextPageText="Next &gt;" PrevPageText="&lt; Prev" />
    <SelectedItemStyle CssClass="bglight" />
    <AlternatingItemStyle CssClass="bgdark" />
    <ItemStyle CssClass="bglight" />
    <Columns>
        <asp:TemplateColumn>
            <HeaderStyle CssClass="listheader" />
            <HeaderTemplate>
                Thread</HeaderTemplate>
            <ItemStyle CssClass="listColumnText" />
            <ItemTemplate>
                <asp:Label runat="server" ID="lbforumid" Text='<%# DataBinder.Eval(Container.DataItem, "forumthreadidPK") %>'
                    Visible="false">
                </asp:Label>
                <asp:LinkButton runat="server" ID="hlforum" CommandName="SelectRow" Text='<%# DataBinder.Eval(Container.DataItem, "forumtitle") %>'></asp:LinkButton>
                <br />
                <div style="white-space: nowrap">
                    <asp:Literal runat="server" Mode="PassThrough" ID="ltdescription" Text='<%# HtmlRemoval.StripTagsCharArray(truncate(DataBinder.Eval(Container.DataItem, "forumdescription").ToString())) %>'></asp:Literal>
                </div>
            </ItemTemplate>
            
        </asp:TemplateColumn>
        <asp:TemplateColumn>
            <HeaderStyle Width="5%" CssClass="listheader" />
            <HeaderTemplate>
                 Replies</HeaderTemplate>
            <ItemStyle CssClass="listColumnText" />
            <ItemTemplate>
                <asp:Label runat="server" ID="lbtotalpost" Text='<%# DataBinder.Eval(Container.DataItem, "totalpost") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateColumn>
        <asp:TemplateColumn>
            <HeaderStyle Width="5%" CssClass="listheader" />
            <HeaderTemplate>
                Views</HeaderTemplate>
            <ItemStyle CssClass="listColumnText" />
            <ItemTemplate>
                <asp:Label runat="server" ID="lbtotalviews" Text='<%# DataBinder.Eval(Container.DataItem, "totalviews") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateColumn>
    </Columns>
</asp:DataGrid>
